﻿<%@ Page Language="C#" MasterPageFile="MasterPage.master" AutoEventWireup="true"
    Inherits="trangchu" Title="Impossible - Thiên đường tài liệu điện tử" CodeFile="TrangChu.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript" src="jquery.simplyscroll-1.0.4/jquery.simplyscroll-1.0.4.min.js"></script>
    <link rel="stylesheet" href="jquery.simplyscroll-1.0.4/jquery.simplyscroll-1.0.4.css"
        media="all" type="text/css">
    <script type="text/javascript">
        (function ($) {
            $(function () { //on DOM ready
                $("#scroller").simplyScroll({
                    autoMode: 'loop'
                });
            });
        })(jQuery);
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="art-post">
        <div class="art-post-tl">
        </div>
        <div class="art-post-tr">
        </div>
        <div class="art-post-bl">
        </div>
        <div class="art-post-br">
        </div>
        <div class="art-post-tc">
        </div>
        <div class="art-post-bc">
        </div>
        <div class="art-post-cl">
        </div>
        <div class="art-post-cr">
        </div>
        <div class="art-post-cc">
        </div>
        <div class="art-post-body">
            <div class="art-post-inner art-article">
                <h2 class="art-postheader">
                    Sản phẩm bán chạy</h2>
                <div class="art-postcontent">
                    <table class="san_pham">
                        <asp:ListView ID="ListView2" runat="server" DataSourceID="SqlDataSource1" EnableModelValidation="True">
                            <EditItemTemplate>
                                <span style="">TenTL:
                                    <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                    <br />
                                    TacGia:
                                    <asp:TextBox ID="TacGiaTextBox" runat="server" Text='<%# Bind("TacGia") %>' />
                                    <br />
                                    MoTa:
                                    <asp:TextBox ID="MoTaTextBox" runat="server" Text='<%# Bind("MoTa") %>' />
                                    <br />
                                    HinhAnh:
                                    <asp:TextBox ID="HinhAnhTextBox" runat="server" Text='<%# Bind("HinhAnh") %>' />
                                    <br />
                                    DonGia:
                                    <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                                    <br />
                                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                                    <br />
                                    <br />
                                </span>
                            </EditItemTemplate>
                            <EmptyDataTemplate>
                                <span>No data was returned.</span>
                            </EmptyDataTemplate>
                            <InsertItemTemplate>
                                <span style="">TenTL:
                                    <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                    <br />
                                    TacGia:
                                    <asp:TextBox ID="TacGiaTextBox" runat="server" Text='<%# Bind("TacGia") %>' />
                                    <br />
                                    MoTa:
                                    <asp:TextBox ID="MoTaTextBox" runat="server" Text='<%# Bind("MoTa") %>' />
                                    <br />
                                    HinhAnh:
                                    <asp:TextBox ID="HinhAnhTextBox" runat="server" Text='<%# Bind("HinhAnh") %>' />
                                    <br />
                                    DonGia:
                                    <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                                    <br />
                                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                                    <br />
                                    <br />
                                </span>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <li>
                                    <div>
                                        <a href="ChiTietSanPham.aspx?ma=<%# Eval("IDTaiLieu") %>">  <img class="scroll_img" src="Image/Sach/<%# Eval("HinhAnh") %>" align="left" width="93"
                                            height="138" /> </a>
                                    </div>
                                </li>
                            </ItemTemplate>
                            <LayoutTemplate>
                                <div id="itemPlaceholderContainer" runat="server">
                                    <ul id="scroller">
                                        <span runat="server" id="itemPlaceholder" />
                                    </ul>
                                </div>
                            </LayoutTemplate>
                            <SelectedItemTemplate>
                                <span style="">TenTL:
                                    <asp:Label ID="TenTLLabel" runat="server" Text='<%# Eval("TenTL") %>' />
                                    <br />
                                    TacGia:
                                    <asp:Label ID="TacGiaLabel" runat="server" Text='<%# Eval("TacGia") %>' />
                                    <br />
                                    MoTa:
                                    <asp:Label ID="MoTaLabel" runat="server" Text='<%# Eval("MoTa") %>' />
                                    <br />
                                    HinhAnh:
                                    <asp:Label ID="HinhAnhLabel" runat="server" Text='<%# Eval("HinhAnh") %>' />
                                    <br />
                                    DonGia:
                                    <asp:Label ID="DonGiaLabel" runat="server" Text='<%# Eval("DonGia") %>' />
                                    <br />
                                    <br />
                                </span>
                            </SelectedItemTemplate>
                        </asp:ListView>
                    </table>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringMembership %>"
                        SelectCommand="SELECT [TenTL], [TacGia], [MoTa], [HinhAnh], [DonGia] FROM [TaiLieu]">
                    </asp:SqlDataSource>
                    <div class="cleared">
                    </div>
                </div>
                <div class="cleared">
                </div>
            </div>
            <div class="cleared">
            </div>
        </div>
    </div>
    <div class="art-post">
        <div class="art-post-tl">
        </div>
        <div class="art-post-tr">
        </div>
        <div class="art-post-bl">
        </div>
        <div class="art-post-br">
        </div>
        <div class="art-post-tc">
        </div>
        <div class="art-post-bc">
        </div>
        <div class="art-post-cl">
        </div>
        <div class="art-post-cr">
        </div>
        <div class="art-post-cc">
        </div>
        <div class="art-post-body">
            <div class="art-post-inner art-article">
                <h2 class="art-postheader">
                    Sản phẩm mới</h2>
                <div class="art-postcontent">
                    <table class="san_pham">
                        <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" onitemcommand="ListView1_ItemCommand" EnableModelValidation="True" DataKeyNames="IDTaiLieu,TenTL,DonGia">
                            <EditItemTemplate>
                                <span style="">TenTL:
                                    <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                    <br />
                                    TacGia:
                                    <asp:TextBox ID="TacGiaTextBox" runat="server" Text='<%# Bind("TacGia") %>' />
                                    <br />
                                    MoTa:
                                    <asp:TextBox ID="MoTaTextBox" runat="server" Text='<%# Bind("MoTa") %>' />
                                    <br />
                                    HinhAnh:
                                    <asp:TextBox ID="HinhAnhTextBox" runat="server" Text='<%# Bind("HinhAnh") %>' />
                                    <br />
                                    DonGia:
                                    <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                                    <br />
                                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                                    <br />
                                    <br />
                                </span>
                            </EditItemTemplate>
                            <EmptyDataTemplate>
                                <span>No data was returned.</span>
                            </EmptyDataTemplate>
                            <InsertItemTemplate>
                                <span style="">TenTL:
                                    <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                    <br />
                                    TacGia:
                                    <asp:TextBox ID="TacGiaTextBox" runat="server" Text='<%# Bind("TacGia") %>' />
                                    <br />
                                    MoTa:
                                    <asp:TextBox ID="MoTaTextBox" runat="server" Text='<%# Bind("MoTa") %>' />
                                    <br />
                                    HinhAnh:
                                    <asp:TextBox ID="HinhAnhTextBox" runat="server" Text='<%# Bind("HinhAnh") %>' />
                                    <br />
                                    DonGia:
                                    <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                                    <br />
                                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                                    <br />
                                    <br />
                                </span>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <div>
                                    <tr>
                                        <td width="30%">
                                            <div class="book_border">
                                               <a href="ChiTietSanPham.aspx?ma=<%# Eval("IDTaiLieu") %>"><img class="hinh_sp" src="Image/Sach/<%# Eval("HinhAnh") %>" align="left" width="93" height="138" /></a>
                                            </div>
                                            <br />
                                            <div class="gia_ban">
                                                Giá bán: <strong>
                                                    <%# format_tt(Eval("DonGia").ToString())%>
                                                </strong>VNĐ</div>
                                            <div class="bo_nut">
                                               <!-- <input id="s" class="sl" type="text" style="width: 50px;" name="email" value="1"> -->
                                               <asp:TextBox ID="TextBox1"  class="sl" runat="server" Text="1" width="50px" ></asp:TextBox>
                                                <span class="art-button-wrapper"><span class="art-button-l"></span><span class="art-button-r">
                                                </span>
                                                 <asp:LinkButton class="art-button" ID="LinkButton1" runat="server" CommandName="AddToCard" CommandArgument='<%#Eval("IDTaiLieu") %>' >Mua</asp:LinkButton>
                                                    <!--<input class="art-button" type="submit" value="Mua" name="search">-->
                                                </span>&nbsp;&nbsp;&nbsp;</div>
                                        </td>
                                        <td>
                                            <div class="ten">
                                                <a href="ChiTietSanPham.aspx?ma=<%# Eval("IDTaiLieu") %>" style="text-decoration: none !important;"> <h5 style="margin: 5px !important;">
                                                    <%# Eval("TenTL") %></h5></a>
                                            </div>
                                            <div class="tac_gia">
                                                <%# Eval("TacGia")%>
                                            </div>
                                            <div class="mo_ta">
                                                <%# Eval("MoTa") %>
                                            </div>
                                        </td>
                                    </tr>
                                </div>
                            </ItemTemplate>
                            <LayoutTemplate>
                                <div id="itemPlaceholderContainer" runat="server" style="">
                                    <span runat="server" id="itemPlaceholder" />
                                </div>
                                <div style="margin: 10px; text-align: right; font-size: 13px;">
                                    <asp:DataPager ID="DataPager1" runat="server" PageSize="5">
                                        <Fields>
                                            <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" FirstPageText="<<"
                                                PreviousPageText="<" ShowNextPageButton="False" ShowPreviousPageButton="True"
                                                ButtonCssClass="pager_btn" />
                                            <asp:NumericPagerField />
                                            <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="True"
                                                ShowPreviousPageButton="False" NextPageText=">" LastPageText=">>" ButtonCssClass="pager_btn" />
                                        </Fields>
                                    </asp:DataPager>
                                </div>
                            </LayoutTemplate>
                            <SelectedItemTemplate>
                                <span style="">TenTL:
                                    <asp:Label ID="TenTLLabel" runat="server" Text='<%# Eval("TenTL") %>' />
                                    <br />
                                    TacGia:
                                    <asp:Label ID="TacGiaLabel" runat="server" Text='<%# Eval("TacGia") %>' />
                                    <br />
                                    MoTa:
                                    <asp:Label ID="MoTaLabel" runat="server" Text='<%# Eval("MoTa") %>' />
                                    <br />
                                    HinhAnh:
                                    <asp:Label ID="HinhAnhLabel" runat="server" Text='<%# Eval("HinhAnh") %>' />
                                    <br />
                                    DonGia:
                                    <asp:Label ID="DonGiaLabel" runat="server" Text='<%# Eval("DonGia") %>' />
                                    <br />
                                    <br />
                                </span>
                            </SelectedItemTemplate>
                        </asp:ListView>
                    </table>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringMembership %>"
                        SelectCommand="SELECT [TenTL], [TacGia], [MoTa], [HinhAnh], [DonGia], [IDTaiLieu] FROM [TaiLieu] ORDER BY IDTaiLieu DESC">
                    </asp:SqlDataSource>
                    <div class="cleared">
                    </div>
                </div>
                <div class="cleared">
                </div>
            </div>
            <div class="cleared">
            </div>
        </div>
    </div>
</asp:Content>
